/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.republicagroup.gestion.util.helpers;

import com.toedter.calendar.JDateChooser;
import java.util.Calendar;
import java.util.Date;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author DIEGOALV
 */
public class JCalendarRender extends JDateChooser implements TableCellRenderer{

    @Override
    public JDateChooser getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        
        
        
        if (value instanceof Date){
            System.out.println(value);
           this.setDate((Date) value);
        } else if (value instanceof Calendar){
            this.setCalendar((Calendar) value);
        }
        return this;
        
        
    }
    
}
